<?php
Doo::loadCore('db/DooModel');

class SbCommentBase extends DooModel{

    /**
     * @var int Max length is 11.
     */
    public $COMMENT_ID;

    /**
     * @var varchar Max length is 120.
     */
    public $COMMENT_USER;

    /**
     * @var text
     */
    public $COMMENT_CONTENT;

    /**
     * @var int Max length is 11.
     */
    public $COMMENT_ID_EVENT;

    /**
     * @var int Max length is 11.
     */
    public $COMMENT_NOTE;

    /**
     * @var datetime
     */
    public $COMMENT_DATE;

    public $_table = 'sb_comment';
    public $_primarykey = 'COMMENT_ID';
    public $_fields = array('COMMENT_ID','COMMENT_USER','COMMENT_CONTENT','COMMENT_ID_EVENT','COMMENT_NOTE','COMMENT_DATE');

    public function getVRules() {
        return array(
                'COMMENT_ID' => array(
                        array( 'integer' ),
                        array( 'maxlength', 11 ),
                        array( 'optional' ),
                ),

                'COMMENT_USER' => array(
                        array( 'maxlength', 120 ),
                        array( 'notnull' ),
                ),

                'COMMENT_CONTENT' => array(
                        array( 'notnull' ),
                ),

                'COMMENT_ID_EVENT' => array(
                        array( 'integer' ),
                        array( 'maxlength', 11 ),
                        array( 'notnull' ),
                ),

                'COMMENT_NOTE' => array(
                        array( 'integer' ),
                        array( 'maxlength', 11 ),
                        array( 'notnull' ),
                ),

                'COMMENT_DATE' => array(
                        array( 'datetime' ),
                        array( 'notnull' ),
                )
            );
    }

}